import { request } from "@/utils/http";
import { hospitalShowType, ProvinceItem, ProvinceList, ReqGetHospitalListParams, ReqGetHospitalListResponse } from "./model/hospitalListType";

export function ReqGethospitalList({page,limit,...set}:ReqGetHospitalListParams){
    return request.get<any,ReqGetHospitalListResponse>(`/admin/hosp/hospital/${page}/${limit}`,{
        params:set
    })
}
// 获取 省
// export function reqGetProvinceList(){
//     return request.get<any,ProvinceList>('/admin/cmn/dict/findByDictCode/province')
// }
// 根据上级id获取子节点数据
export function reqGetCityOrDistrictList(id:number){
    return request.get<any,ProvinceList>(`/admin/cmn/dict/findByParentId/${id}`)
}
// 获取医院详细信息
export function reqGethostypeListContentShow(id:string){
    return request.get<any,hospitalShowType>(`/admin/hosp/hospital/show/${id}`)
}

// 修改状态
export function reqChangeStatus(id:string,statu:number){
    return request.get<any,null>(`/admin/hosp/hospital/updateStatus/${id}/${statu}`)
}